<!DOCTYPE html>
<html lang="en" style="height:100%">

<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>帮助中心</title>
    <link rel="stylesheet" type="text/css" href="../../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../../css/style.css" />
    <link rel="stylesheet" type="text/css" href="../../css/yzl.css" />
    <link rel="stylesheet" type="text/css" href="../../css/vant.css" />
    <!-- <link rel="stylesheet" href="../../css/BarlowCondensed-Bold.woff.ttf" /> -->
    <!-- <link rel="stylesheet" href="../../css/sqc.css"> -->
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        input{

            outline:none;
        }

    </style>
</head>

<body style="background: #f7f4f2;">
<!--<div id="blank" class="header" v-cloak style="border-bottom:1px solid #f7f4f2;">-->
    <!--<div v-back.tapmode class="back"></div>-->
    <!--<div class="title">编辑资料</div>-->
<!--</div>-->
<div id="app"  v-cloak>
    <div class="help-top">
        <div class="help-top-title">
            <div v-back.tapmode class="back"></div>
            <div class="title">帮助中心</div>
        </div>
        <div class="search" v-open-win vurl="search">
            <img src="../../image/small/1_search_1.png"/>
            <span class="guanjianzi">搜索问题关键词</span>
            <span class="sousuo">搜索</span>
        </div>
        <div class="help-top-item">
            <img :src="help_info.memberAdd"/>
            <div class="help-title" style="margin-top: 5px">HI，{{help_info.nickname}}</div>
            <div class="help-title" style="font-weight: bold;font-size: 15px;">你好</div>
        </div>
    </div>
    <div class="accordion">
        <van-collapse v-model="activeNames" accordion v-for='(list,index) in proplem_title' :key="index">
            <van-collapse-item  :name='list.id'>
                <div slot="title" v-myclick='[list.id,get_proplem]'><img class="accordion-img" v-src="'../../image/zhanghao.png'"/>{{list.type_name}}</div>
                <div class="notice_content_type" v-for="(data, index) in proplem_list" :key="index" v-open-win="{id:data.id}" vurl="helpdetails">{{data.question_title}}</div>
            </van-collapse-item>
        </van-collapse>
    </div>
</div>
</body>
<script src="../../script/api.js"></script>
<script src="../../script/vue.js"></script>
<script src="../../script/app.js"></script>
<script src="../../script/common.js"></script>
<script src="../../script/url.js"></script>
<script src="../../script/components.js"></script>
<script type="text/javascript" src="../../script/vant.min.js"></script>
<script>
    var vm,
        wx,
        proplem_title,
        proplem_list,
        help_info,
        apiready = function () {
            setBSImg();
            new Vue({
                el: '#blank'
            })
            wx = api.require('wx');
            // setBSImg();
            var data = {
                member_id: getPrefs('member_id'),
            };
            var callback = function (ret) {
                proplem_title = ret.content;
                console.log(JSON.stringify(proplem_title));
                initApp();
            }
            pinet.post(APIURL + '/app/help/typeList', data, callback);
            api.parseTapmode();
        };

    function initApp() {
        // var isBigImg = Vue.BSImg == 'big';
        vm = new Vue({
            el: '#app',
            data: {
                activeNames: [1],
                proplem_title:proplem_title,
                proplem_list:proplem_list,
                help_info:help_info,
            },
            computed: {

            },
            mounted:function(){
              this.get_info();
            },
            watch:{},
            methods: {
                get_proplem:function(value){
                  console.log(value);
                  var data = {
              			member_id:getPrefs('member_id'),
                    type_id:value,
              		};
              		var callback=function(ret){
              			vm.proplem_list = ret.content;
              			console.log(JSON.stringify(vm.proplem_list));
              		}
              		pinet.post(APIURL+'/app/help/questionList',data, callback);
                },
                get_info:function () {
                    var data = {
                        wxOpenId:getPrefs('openid'),
                        token:getPrefs('token'),
                    };
                    var callback=function(ret){
                        vm.help_info = ret.content;
                        console.log(JSON.stringify(vm.help_info));
                    }
                    pinet.post(APIURLP+'/play/user/queryUserInfo',data, callback);
                }
            },
        })
    }



</script>

</html>
